<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>数组的创建方式</title>
    </head>
    <body>

        <script type="text/javascript">

            //创建数组
            var arr1 = new Array(5);
            arr1[0] = 100;
            arr1[1] = 2.00;
            arr1[2] = true;
            arr1[3] = "字符串";

            var arr2 = ["传智","黑马"];

            var result = arr1.concat(arr2);
            console.log(result)


            //把arr1数组转换为字符串
            var s = arr1.join(":");
            console.log(s)


            var reverse = arr1.reverse();
            console.log(reverse)


        </script>

    </body>
</html>